home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / any.z / any
Encoding:
Text File  |  2002-10-03  |  3.9 KB  |  99 lines

  1. ANY(3I)                                               Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      AANNYY - Determines whether any values are true
  6.  
  7. SSYYNNOOPPSSIISS
  8.      AANNYY (([MMAASSKK==]_m_a_s_k [,,[DDIIMM==]_d_i_m]))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, IRIX systems
  12.  
  13.      CF90, MIPSpro 7 Fortran 90
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      Fortran
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      The AANNYY intrinsic function determines whether any value is true in
  20.      argument _m_a_s_k along dimension _d_i_m.  It accepts the following
  21.      arguments:
  22.  
  23.      _m_a_s_k      Must be of type logical.  It must not be a scalar.
  24.  
  25.      _d_i_m       Must be a scalar.  It must be an integer value in the range
  26.                1 <= _d_i_m <= _n, where _n is the rank of _m_a_s_k.  The
  27.                corresponding actual argument must not be an optional dummy
  28.                argument.
  29.  
  30.      AANNYY is a transformational function.  The name of this intrinsic cannot
  31.      be passed as an argument.
  32.  
  33. RREETTUURRNN VVAALLUUEESS
  34.      The result is type logical.  It is a scalar result if _d_i_m is absent or
  35.      if _m_a_s_k has rank one.  Otherwise, the result is an array of rank _n-1
  36.      and of shape (_d , _d , ..., _d     , _d     , ..., _d ),
  37.                     1   2        _d_i_m-1   _d_i_m+1        _n
  38.      where (_d , _d , ..., _d )
  39.              1   2        _n
  40.      is the shape of _m_a_s_k.
  41.  
  42.      The result of AANNYY((_m_a_s_k)) has the value TTRRUUEE if any element of _m_a_s_k is
  43.      true.  The result has the value FFAALLSSEE if no elements of _m_a_s_k are true
  44.      or if _m_a_s_k is a zero-sized array.
  45.  
  46.      If _m_a_s_k has rank one, AANNYY((_m_a_s_k,,_d_i_m) has a value equal to that of
  47.      AANNYY((_m_a_s_k)).  Otherwise, the value of
  48.      element (_s , _s , ..., _s     , _s     , ..., _s )
  49.                1   2        _d_i_m-1   _d_i_m+1        _n
  50.      of AANNYY((_m_a_s_k,,_d_i_m) is equal to
  51.      AANNYY((_m_a_s_k (_s , _s , ..., _s     , : , _s     , ..., _s )).
  52.                 1   2        _d_i_m-1       _d_i_m+1        _n
  53.  
  54. EEXXAAMMPPLLEESS
  55.      Example 1:
  56.  
  57.      * AANNYY (( ((// ..TTRRUUEE..,, ..FFAALLSSEE..,, ..TTRRUUEE.. //)) )) is ..TTRRUUEE...
  58.  
  59.      * AANNYY ((_m_a_s_k) is ..FFAALLSSEE.. when _m_a_s_k is a zero-sized array.
  60.  
  61.      Example 2:  Assume that BB and CC are arrays as follows:
  62.  
  63.      BB is the following array:
  64.  
  65.      | 1 3 5 |
  66.      | 2 4 6 |
  67.  
  68.      CC is the following array:
  69.  
  70.      | 0 3 5 |
  71.      | 7 4 8 |
  72.  
  73.      * AANNYY (( BB ..NNEE.. CC )) is ..TTRRUUEE...
  74.  
  75.      * AANNYY (( BB ..NNEE.. CC,, DDIIMM==11 )) is [[..TTRRUUEE..,, ..FFAALLSSEE..,, ..TTRRUUEE..]]
  76.  
  77.      * AANNYY (( BB ..NNEE.. CC,, DDIIMM==22 )) is [[..TTRRUUEE..,, ..TTRRUUEE..]]..
  78.  
  79.      * AANNYY (( CC ..EEQQ.. 11 )) is [[..FFAALLSSEE..]] because no elements of the mask are
  80.        true.
  81.  
  82.      Example 3:  Assume that array NN is as follows:
  83.  
  84.      | 0 1 2 3 |
  85.      | 4 5 6 7 |
  86.      | 8 9 0 1 |
  87.  
  88.      In an array section reference, you can expect the following results:
  89.  
  90.      * AANNYY((((NN((22::33,,22::44))..NNEE..00)))) is ..TTRRUUEE..
  91.  
  92.      * AANNYY((((NN((22::33,,22::44))..NNEE..00)),,DDIIMM==11)) is [[..TTRRUUEE..,, ..TTRRUUEE..,, ..TTRRUUEE..]]
  93.  
  94.      * AANNYY((((NN((22::33,,22::44))..NNEE..00)),,DDIIMM==22)) is [[..TTRRUUEE..,, ..TTRRUUEE..]]
  95.  
  96. SSEEEE AALLSSOO
  97.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  98.      man page.
  99.